package com.example.firstfour;


import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    TextView out1;
    TextView out2;

    int point1 = 0;
    int point2 = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        out1 = (TextView) findViewById(R.id.tv1);
        out2 = (TextView) findViewById(R.id.tv2);
    }

    public void btna_1(View view) {
        point1 += 3;
        out1.setText("" + point1);
    }

    public void btna_2(View view) {
        point1 += 2;
        out1.setText("" + point1);
    }

    public void btna_3(View view) {
        point1 += 1;
        out1.setText("" + point1);
    } //TeameA

    public void btnb_1(View view) {
        point2 += 3;
        out2.setText("" + point2);
    }

    public void btnb_2(View view) {
        point2 += 2;
        out2.setText("" + point2);
    }

    public void btnb_3(View view) {
        point2 += 1;
        out2.setText("" + point2);
    }//TeamB

    public void btn1(View view) {
        point1 = 0;
        point2 = 0;
        out1.setText("" + point1);
        out2.setText("" + point2);
    }//RESET

}
